<?php

require_once dirname(__FILE__) . '/mysql_config.php';
require_once dirname(__FILE__) . '/Database.php';
global $dbConfig;
global $con;
$con = new Database($dbConfig["mysql_ip"], $dbConfig['mysql_user'], $dbConfig['mysql_passwd'], $dbConfig['mysql_name']);
if (! $con) {
    die('无法连接到数据库: ' . mysql_error());
}

function getConnection()
{
    global $con;
    return $con;
}

?>